

/**
 * @en
 * Contains the names of the input and output tensors for the Inference Brain.
 * @zh
 * 包含推理大脑的输入和输出张量的名称。
 */
export class TensorNames {
    public static readonly batchSizePlaceholder = "batch_size";
    public static readonly sequenceLengthPlaceholder = "sequence_length";
    public static readonly vectorObservationPlaceholder = "vector_observation";
    public static readonly recurrentInPlaceholder = "recurrent_in";
    public static readonly visualObservationPlaceholderPrefix = "visual_observation_";
    public static readonly observationPlaceholderPrefix = "obs_";
    public static readonly previousActionPlaceholder = "prev_action";
    public static readonly actionMaskPlaceholder = "action_masks";
    public static readonly randomNormalEpsilonPlaceholder = "epsilon";
    public static readonly valueEstimateOutput = "value_estimate";
    public static readonly recurrentOutput = "recurrent_out";
    public static readonly memorySize = "memory_size";
    public static readonly versionNumber = "version_number";
    public static readonly continuousActionOutputShape = "continuous_action_output_shape";
    public static readonly discreteActionOutputShape = "discrete_action_output_shape";
    public static readonly continuousActionOutput = "continuous_actions";
    public static readonly discreteActionOutput = "discrete_actions";
    public static readonly deterministicContinuousActionOutput = "deterministic_continuous_actions";
    public static readonly deterministicDiscreteActionOutput = "deterministic_discrete_actions"

    // Deprecated keys
    public static readonly isContinuousControlDeprecated = "is_continuous_control";
    public static readonly actionOutputDeprecated = "action";
    public static readonly actionOutputShapeDeprecated = "action_output_shape";

    /**
     * @en
     * Returns the name of the visual observation with a given index
     * @zh
     * 返回具有给定索引的视觉观察的名称
     * @param index 
     * @returns 
     */
    public static getVisualObservationName(index: number): string {
        return TensorNames.visualObservationPlaceholderPrefix + index;
    }

    /**
     * @en
     * Returns the name of the observation with a given index
     * @zh
     * 返回具有给定索引的观察的名称
     * @param index 
     * @returns 
     */
    public static getObservationName(index: number): string {
        return TensorNames.observationPlaceholderPrefix + index;
    }
}